package cn.com.huzo.model.entities.workflow;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 调达表审核规则实体类
 *
 * @author 吴旭
 */
public class ApprovalRuleMrpEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -1462947764582096831L;
    private Long RuleId;
    private Integer DesignedBy;
    private String DesignedByName;
    private Integer ApprovedBy;
    private String ApprovedByName;
    private String Description;

    public Long getRuleId() {
        return RuleId;
    }

    public void setRuleId(Long RuleId) {
        this.RuleId = RuleId;
    }

    public Integer getDesignedBy() {
        return DesignedBy;
    }

    public void setDesignedBy(Integer DesignedBy) {
        this.DesignedBy = DesignedBy;
    }

    public String getDesignedByName() {
        return DesignedByName;
    }

    public void setDesignedByName(String DesignedByName) {
        this.DesignedByName = DesignedByName;
    }

    public Integer getApprovedBy() {
        return ApprovedBy;
    }

    public void setApprovedBy(Integer ApprovedBy) {
        this.ApprovedBy = ApprovedBy;
    }

    public String getApprovedByName() {
        return ApprovedByName;
    }

    public void setApprovedByName(String ApprovedByName) {
        this.ApprovedByName = ApprovedByName;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof ApprovalRuleMrpEntity)) {
            return false;
        }

        final ApprovalRuleMrpEntity that = (ApprovalRuleMrpEntity) o;

        return new EqualsBuilder()
                .append(this.getRuleId(), that.getRuleId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getRuleId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
